const point = {
  x: 1,
  y: 2,
};
console.log(JSON.stringify(point)); // {"x":1,"y":2}
point.toJSON = function () {
  return `(${this.x}, ${this.y})`;
};
console.log(JSON.stringify(point)); // "(1, 2)"
